<%@ page language="java"
	import="java.util.*,com.arice.hnust.dao.*,com.arice.hnust.bean.*,com.arice.hnust.util.*"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	//获取登录管理员信息

	String adminstuNum = (String) request.getSession().getAttribute(
			"loginStuNum");
	String adminstuName = null;//学生姓名
	String adminstuClass = null;//学生班级
	ArrayList<StuInfo> adminstus = StuInfoDao.getStuByStuNum(adminstuNum);
	for (int i = 0; i < adminstus.size(); i++) {
		StuInfo adminstu = adminstus.get(0);
		adminstuName = adminstu.getStuName();//学生姓名
		adminstuClass = adminstu.getStuClass();//学生班级 
	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>管理员:<%=adminstuName%></title>

<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/jquery-1.6.min.js"></script>
<script type="text/javascript" src="js/index.js"></script>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<div class="nav-top">
		<span>ARICE APP</span>
		<div class="nav-topright">
			<span>您好：管理员&nbsp;&nbsp;<%=adminstuName%>&nbsp;&nbsp;<%=DateHelper.getDateTimeByNow()%></span><span>Powdered
				by&nbsp;&nbsp;<a href="http://blog.sina.com.cn/ariceone"
				target="_blank">Arice</a>
			</span>
		</div>
	</div>
	<div class="nav-down">
		<form method="post" action="/hnust/mainframe.html">
			<div class="leftmenu1">
				<div class="menu-oc">
					<img src="imgs/menu-all.png" />
				</div>
				<ul>
					<li><a class="a_list a_list1">学生信息查询</a>
						<div class="menu_list menu_list_first">
							<input type="submit" name="btn" value="本人信息"> <input
								type="submit" name="btn" value="查询全部"> <input
								type="submit" name="btn" value="查询全部"> <input
								type="submit" name="btn" value="查询全部">
						</div></li>
					<li><a class="a_list a_list2">权限管理</a>
						<div class="menu_list">
							<input type="submit" name="btn" value="权限设置"> <input
								type="submit" name="btn" value="成员管理">

						</div></li>
					<li><a class="a_list a_list3">成绩查询</a>
						<div class="menu_list">
							<input type="submit" name="btn" value="本人成绩查询"> <input
								type="submit" name="btn" value="他人成绩查询">
						</div></li>
					<li><a class="a_list a_list3">课表查询</a>
						<div class="menu_list">
							<input type="submit" name="btn" value="本人课表查询"> <input
								type="submit" name="btn" value="他人课表查询">
						</div></li>
					<li><a class="a_list a_list3">校历查询</a>
						<div class="menu_list">
							<input type="submit" name="btn" value="校历信息">
						</div>
					</li>
				</ul>
			</div>
			<div class="leftmenu2">
				<div class="menu-oc1">
					<img src="imgs/menu-all.png" />
				</div>
				<ul>
					<li><a class="j_a_list j_a_list1"></a>
						<div class="j_menu_list j_menu_list_first">
							<span class="sp1"><i></i>学生信息查询</span> <input
								class="j_lista_first" type="submit" name="btn" value="本人信息">
							<input type="submit" name="btn" value="查询全部"> <input
								type="submit" name="btn" value="查询全部"> <input
								type="submit" name="btn" value="查询全部">
						</div></li>
					<li><a class="j_a_list j_a_list2"></a>
						<div class="j_menu_list">
							<span class="sp2"><i></i>权限管理</span> <input type="submit"
								name="btn" value="权限设置"> <input type="submit"
								name="btn" value="成员管理">
						</div></li>
					<li><a class="j_a_list j_a_list3"></a>
						<div class="j_menu_list">
							<span class="sp3"><i></i>成绩查询</span> <input type="submit"
								name="btn" value="本人成绩查询"> <input type="submit"
								name="btn" value="他人成绩查询">
						</div></li>
					<li><a class="j_a_list j_a_list3"></a>
						<div class="j_menu_list">
							<span class="sp3"><i></i>课表查询</span> <input type="submit"
								name="btn" value="本人课表查询"> <input type="submit"
								name="btn" value="他人课表查询">
						</div></li>
					<li><a class="j_a_list j_a_list3"></a>
						<div class="j_menu_list">
							<span class="sp3"><i></i>校历查询</span> <input type="submit"
								name="btn" value="校历信息">
						</div></li>
				</ul>
			</div>
		</form>

		<div align="center">
			<div class="right_con">
				<form method="post" action="/hnust/mainframe.html">
					<input type="text" name="search" value="" placeholder="学号/姓名">
					<input type="submit" name="btn" class="search_btn" value="search">
					<input type="submit" name="btn" class="search_btn"
						value="searchAll">
				</form>
				<table border="0px" width="750px">
					<%
						//所有的学生信息
						ArrayList<StuInfo> stus = StuInfoDao.getAllStu();
						out.print(" <tr><td width=\"150px\"></td><td width=\"150px\"></td><td width=\"150px\"></td><td width=\"200px\">全部学生共有记录为:"
								+ stus.size() + "人</td><td width=\"100px\"></td></tr>");
						out.print(" <tr bgcolor=\"#7d6c71\"><td>学号</td><td>姓名</td><td>班级</td><td>身份证号</td><td>照片</td></tr>");
						for (int i = 0; i < stus.size(); i++) {
							StuInfo stu1 = stus.get(i);
							String stuName1 = stu1.getStuName();//学生姓名
							String stuNum1 = stu1.getStuNum();//学号
							String stuIdNum1 = stu1.getStuIdNum();//身份证号
							String stuClass1 = stu1.getStuClass();//班级
							if (i % 2 == 0) {
								out.print("<tr bgcolor=\"#99ffff\"><td>"
										+ stuNum1
										+ "</td><td>"
										+ stuName1
										+ "</td><td>"
										+ stuClass1
										+ "</td><td>"
										+ stuIdNum1
										+ "</td><td><img src=\"imgs/stupic/"
										+ stuNum1
										+ ".jpg\" height=\"140px\" width=\"100px\"></td></tr>");
							} else {
								out.print("<tr bgcolor=\"#66ccff\"><td>"
										+ stuNum1
										+ "</td><td>"
										+ stuName1
										+ "</td><td>"
										+ stuClass1
										+ "</td><td>"
										+ stuIdNum1
										+ "</td><td><img src=\"imgs/stupic/"
										+ stuNum1
										+ ".jpg\" height=\"140px\" width=\"100px\"></td></tr>");
							}
						}
					%>
				</table>
			</div>
		</div>
	</div>
</body>
</html>
